﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Happy.Query.Filters.Configuration
{
    /// <summary>
    /// 扩展类。
    /// </summary>
    public static class IMethodOfConnectorExtentions
    {
        /// <summary>
        /// 配置连接器。
        /// </summary>
        public static IConfigOfConnector And(this IMethodOfConnector that)
        {
            return that.Connector(Connector.And);
        }

        /// <summary>
        /// 配置连接器。
        /// </summary>
        public static IConfigOfConnector Or(this IMethodOfConnector that)
        {
            return that.Connector(Connector.Or);
        }

        /// <summary>
        /// 配置连接器。
        /// </summary>
        public static IConfigOfConnector AndNot(this IMethodOfConnector that)
        {
            return that.Connector(Connector.AndNot);
        }

        /// <summary>
        /// 配置连接器。
        /// </summary>
        public static IConfigOfConnector OrNot(this IMethodOfConnector that)
        {
            return that.Connector(Connector.OrNot);
        }
    }
}
